﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Client.Models
{
    public class CBM_Contract
    {
        /// <summary>
        /// 
        /// </summary>
        public string? BillId { get; set; }
        /// <summary>
        /// 合同类型
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 合同编号
        /// </summary>
        public string? BillNo { get; set; }
        /// <summary>
        /// 合同金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 合同结算金额
        /// </summary>
        public decimal SettledAmount { get; set; }
        /// <summary>
        /// 合同剩余结算金额
        /// </summary>
        private decimal SurplusAmount_;

        public decimal SurplusAmount
        {
            get {
                SurplusAmount_ = Amount - SettledAmount;
                return SurplusAmount_; }
            set { SurplusAmount_ = value; }
        }

    }
}
